package com.whfc.common.enums;

/**
 * @Description: 报警信息业务模块
 * @author: xugcheng
 * @version: 1.0
 * @date: 2019/11/30 11:26
 */
public enum AppWarnModuleType {

    MACH(1, "设备"),
    EMP(2, "人员"),
    MAM(3, "物资"),
    ENV(4, "环境"),
    FIM(5, "智能监控"),
    FSE(6, "特种设备"),
    EQUIP(7, "考勤设备"),
    QUALITY(8, "质量管理"),
    SAFETY(9, "安全管理"),
    ROTARY(10, "旋挖设备"),
    ENERGY(11,"能耗设备"),
    ;


    private Integer value;

    private String desc;

    AppWarnModuleType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer value() {
        return value;
    }

    public static AppWarnModuleType parseValue(Integer value) {
        switch (value) {
            case 1:
                return MACH;
            case 2:
                return EMP;
            case 3:
                return MAM;
            case 4:
                return ENV;
            case 5:
                return FIM;
            case 6:
                return FSE;
            case 7:
                return EQUIP;
            case 8:
                return QUALITY;
            case 9:
                return SAFETY;
            case 10:
                return ROTARY;
            default:
                return null;
        }
    }
}
